<?php
namespace app\common\validate;

use think\Validate;

class Permission extends Validate {

    protected $rule = [
        'title' =>'require',
        'url'   => 'require|regex:\w+\/\w+\/\w+(\/\w+){0,1}'
    ];

    protected $message = [
        'title.require' => '权限名称必填',
        'url.require'   => '权限标志必填',
        'url.regex'     => '权限标志不符合要求'
    ];
}